<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
  <div id='app'>
    <div>
      <dd-header></dd-header>
    </div>
  </div>
  <script type='text/javascript'>
    Vue.component('dd-header', {
      data(){
        return {
          msg: '我王境泽就算饿死，从六十层跳下去，也不会吃这碗饭。'
        }
      },
      template: '<div>{{msg}}<br /> <button @click="didi">点我必真香</button></div>',
      methods: {
        didi(){
          this.msg = '真香~~~';
        }
      },

    })
    var vm = new Vue({
      el: '#app',
      data: {
        
      },
      methods: {
        
      }
    });
  </script>
</body>
</html>